package stark.app.function.fdy;

import android.os.Bundle;

import stark.app.R;
import stark.app.base.BaseWithFragmentActivity;
import stark.app.databinding.ActivityFdyDemoBinding;
import stark.common.basic.base.BaseNoModelActivity;
import stark.common.basic.constant.Extra;

/**
 * Author：daizhongbin on 2021/10/23
 * Email：1027154338@qq.com
 * Desc:
 */
public class FdyDemoActivity extends BaseNoModelActivity<ActivityFdyDemoBinding> {

    @Override
    protected int onCreate() {
        return R.layout.activity_fdy_demo;
    }

    @Override
    protected void initView() {
        mDataBinding.btnVer.setOnClickListener(v -> {
            start(false);
        });
        mDataBinding.btnHor.setOnClickListener(v -> {
            start(true);
        });
    }

    @Override
    protected void initData() {
    }

    private void start(boolean isHorizontal) {
        Bundle bundle = new Bundle();
        bundle.putBoolean(Extra.TYPE, isHorizontal);
        BaseWithFragmentActivity.start(this, "仿抖音", FdyDemoFragment.class, bundle);
    }
}
